//
// Created by Tony on 2024/7/9.
//

#ifndef RT_CODE_METHOD_REF_H
#define RT_CODE_METHOD_REF_H

#include "../Method.h"
#include "MemberRef.h"
#include <cstdint>

namespace RtCode {

class MethodRef : public MemberRef {
    weak_ptr<Method> mMethod;

public:
    MethodRef(const shared_ptr<ConstantPool>& constantPool, uint16_t classNameIndex,
              uint16_t memberNameIndex)
        : MemberRef(constantPool, classNameIndex, memberNameIndex) {}

    shared_ptr<Method> resolvedMethod();
};

} // namespace RtCode

#endif // RT_CODE_METHOD_REF_H
